﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


public class BLL_tbl_equipment_master
{
    public BLL_tbl_equipment_master()
    {

    }

    public List<tbl_equipment_master> select(int EQUIPMENT_ID)
    {
        DAL_tbl_equipment_master dal = new DAL_tbl_equipment_master();
        return dal.select(EQUIPMENT_ID);
    }

    public List<tbl_equipment_master> selectAll()
    {
        DAL_tbl_equipment_master dal = new DAL_tbl_equipment_master();
        return dal.selectAll();
    }

    public bool insert(tbl_equipment_master tbl)
    {
        DAL_tbl_equipment_master dal = new DAL_tbl_equipment_master();
        int i = 0;
        i = dal.insert(
            tbl.EQUIPMENT_NAME
, tbl.SHORT_NAME
, tbl.DETAILS
, tbl.IS_ACTIVE
, tbl.CREATED_BY
, tbl.CREATED_DATE
        );

        return Convert.ToBoolean(i);
    }


    public bool update(tbl_equipment_master tbl)
    {
        DAL_tbl_equipment_master dal = new DAL_tbl_equipment_master();
        int i = 0;
        i = dal.update(
            tbl.EQUIPMENT_ID
, tbl.EQUIPMENT_NAME
, tbl.SHORT_NAME
, tbl.DETAILS
, tbl.IS_ACTIVE
, tbl.MODIFIED_BY
, tbl.MODIFIED_DATE
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_equipment_master tbl)
    {
        DAL_tbl_equipment_master dal = new DAL_tbl_equipment_master();
        int i = 0;
        i = dal.delete(
                tbl.EQUIPMENT_ID
        );

        return Convert.ToBoolean(i);
    }


}

